Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[show] Fix 'show int neighbor expected' #1106

Merged
merged 1 commit into from
Sep 18, 2020
Merged

Conversation

lolyu
Copy link
Contributor

@lolyu lolyu commented Sep 10, 2020

Fix show int neighbor expected

Signed-off-by: Longxiang Lyu [email protected]

- What I did

- How I did it

- How to verify it

- Previous command output (if the output of a command-line utility has changed)

$ show int neighbor expected
Traceback (most recent call last):
  File "/usr/bin/show", line 12, in <module>
    sys.exit(cli())
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/show/main.py", line 836, in expected
    for port in natsorted(neighbor_dict['DEVICE_NEIGHBOR'].keys()):
KeyError: 'DEVICE_NEIGHBOR'

- New command output (if the output of a command-line utility has changed)

$ show int neighbor expected
LocalPort    Neighbor    NeighborPort    NeighborLoopback    NeighborMgmt    NeighborType
-----------  ----------  --------------  ------------------  --------------  --------------
Ethernet64   ARISTA01T0  Ethernet1       None                10.64.247.144   ToRRouter
Ethernet4    ARISTA01T2  Ethernet2       None                10.64.247.136   SpineRouter
Ethernet68   ARISTA02T0  Ethernet1       None                10.64.247.145   ToRRouter
Ethernet72   ARISTA03T0  Ethernet1       None                10.64.247.146   ToRRouter
Ethernet12   ARISTA03T2  Ethernet2       None                10.64.247.137   SpineRouter
Ethernet76   ARISTA04T0  Ethernet1       None                10.64.247.147   ToRRouter
Ethernet80   ARISTA05T0  Ethernet1       None                10.64.247.148   ToRRouter
Ethernet20   ARISTA05T2  Ethernet2       None                10.64.247.138   SpineRouter
Ethernet84   ARISTA06T0  Ethernet1       None                10.64.247.149   ToRRouter
Ethernet88   ARISTA07T0  Ethernet1       None                10.64.247.150   ToRRouter
Ethernet28   ARISTA07T2  Ethernet2       None                10.64.247.139   SpineRouter
Ethernet92   ARISTA08T0  Ethernet1       None                10.64.247.151   ToRRouter
Ethernet96   ARISTA09T0  Ethernet1       None                10.64.247.152   ToRRouter
Ethernet36   ARISTA09T2  Ethernet2       None                10.64.247.140   SpineRouter
Ethernet100  ARISTA10T0  Ethernet1       None                10.64.247.153   ToRRouter
Ethernet104  ARISTA11T0  Ethernet1       None                10.64.247.154   ToRRouter
Ethernet44   ARISTA11T2  Ethernet2       None                10.64.247.141   SpineRouter
Ethernet108  ARISTA12T0  Ethernet1       None                10.64.247.155   ToRRouter
Ethernet112  ARISTA13T0  Ethernet1       None                10.64.247.156   ToRRouter
Ethernet52   ARISTA13T2  Ethernet2       None                10.64.247.142   SpineRouter
Ethernet116  ARISTA14T0  Ethernet1       None                10.64.247.157   ToRRouter
Ethernet120  ARISTA15T0  Ethernet1       None                10.64.247.158   ToRRouter
Ethernet60   ARISTA15T2  Ethernet2       None                10.64.247.143   SpineRouter
Ethernet124  ARISTA16T0  Ethernet1       None                10.64.247.159   ToRRouter

@lolyu
Copy link
Contributor Author

lolyu commented Sep 14, 2020

Retest this please

@jleveque
Copy link
Contributor

@lolyu: I'm curious why this pull request is made directly against the 201911 branch? Is this PR not applicable to the master branch, also? If it is, then we will have a regression upstream. Unless the PR is specific to a release branch, changes should always be made to the master branch and labeled with "Request for X branch" labels for all applicable release branches. If the cherry-pick operation is not clean, the branch maintainer will request you open a new PR specifically against that release branch

@lolyu
Copy link
Contributor Author

lolyu commented Sep 15, 2020

@lolyu: I'm curious why this pull request is made directly against the 201911 branch? Is this PR not applicable to the master branch, also? If it is, then we will have a regression upstream. Unless the PR is specific to a release branch, changes should always be made to the master branch and labeled with "Request for X branch" labels for all applicable release branches. If the cherry-pick operation is not clean, the branch maintainer will request you open a new PR specifically against that release branch

Hi @jleveque, there is a patch fixing this issue for the master branch. Also the fix location differs between 201911(show/main.py) and master(show/__init__.py), so there should be two patches regarding this since cherry-picking isn't an option here.

@jleveque
Copy link
Contributor

Retest this please

2 similar comments
@lolyu
Copy link
Contributor Author

lolyu commented Sep 16, 2020

Retest this please

@lolyu
Copy link
Contributor Author

lolyu commented Sep 16, 2020

Retest this please

@lolyu lolyu merged commit 294bed9 into sonic-net:201911 Sep 18, 2020
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request Apr 28, 2022
Revert "Revert " [201911]show interface counters for multi ASIC devices
(sonic-net#1104)""
 Revert "Revert "Pfcstat (sonic-net#1097)""
  [show] Fix 'show int neighbor expected' (sonic-net#1106)
   Update argument for docker exec it->i (sonic-net#1118)
     Update to make config load/reload backward compatible. (sonic-net#1115)
     Handling deletion of Port Channel before deletion of its members
     (sonic-net#1062)
    Skip default route present in ASIC-DB but not in APP-DB. (sonic-net#1107)
     [CLI][PFCWD][Multi-ASIC] Added multi ASIC support to 'pfcwd' CLI
     (sonic-net#1102)
       [201911]  Multi asic platform config interface portchannel, show
       transceiver  (sonic-net#1087)
       [drop counters] Fix configuration for counters with lowercase
       names (sonic-net#1103)

Signed-off-by: Abhishek Dosi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants